#include <iostream>
#include <string>
#include <regex>


int main()
{
    std::string str = "/numbers/12345";
    std::regex e("/numbers/(\\d+)");

    std::smatch smatchs;
    bool ret = std::regex_match(str, smatchs, e);
    if(ret == false)
    {
        std::cerr << "regex failed!" << std::endl;
        return 1;
    }
    
    for(auto &e : smatchs)
        std::cout << e << std::endl;

    return 0;
}